package com.k.demo.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import com.k.demo.entity.Vips;

@Mapper
public interface VipMapper {

	public List<Vips> selectAll();
	
	public int insert(Vips vip);
	
	public int delete(List<Integer> deletelist);
	
	public int update(Vips vip);
	
	@ResultMap("VipWithUser")
	@Select("select * from vips where vip_lv=#{vip_lv}")
	public List<Vips> selectByLv(int vip_lv);
	
	@ResultMap("VipWithUser")
	@Select("select * from vips where user_id=#{user_id}")
	public Vips selectByUserId(int user_id);
	
	public List<Vips> selectByUserIdAndLv(Vips vips);
	
	
}
